﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace TwlNS
{
    public class Coord
    {
        public double X { get; set; }
        public double Y { get; set; }

        /// <summary>
        /// Initializes a new instance of the Coord class.
        /// </summary>
        public Coord(double x, double y)
        {
            X = x;
            Y = y;
        }

        public double distance(Coord obj)
        {
            return Math.Sqrt((X - obj.X) * (X - obj.X) + (Y - obj.Y) * (Y - obj.Y));
        }
    }
}
